package com.search.entity;


import com.alibaba.fastjson2.JSONObject;

/**
 * book_doubanlist_capital实体类
 * 
 * @author 
 *
 */
public class BookDoubanlistCapital {
	/***/
	private String bookName; 
	/***/
	private String isbn; 
	/***/
	private Double rating; 
	/***/
	private Integer listId; 
	/***/
	private String holding; 
	/**
	 * 实例化
	 */
	public BookDoubanlistCapital() {
		super();
	}
	/**
	 * 实例化
	 * 
	 * @param obj
	 */
	public BookDoubanlistCapital(JSONObject obj) {
		this();
		if (obj.get("bookName") instanceof String) {
			this.setBookName((String) obj.get("bookName"));
		}
		if (obj.get("isbn") instanceof String) {
			this.setIsbn((String) obj.get("isbn"));
		}
		if (obj.get("rating") instanceof Number) {
			this.setRating(((Number) obj.get("rating")).doubleValue());
		}
		if (obj.get("listId") instanceof Number) {
			this.setListId(((Number) obj.get("listId")).intValue());
		}
		if (obj.get("holding") instanceof String) {
			this.setHolding((String) obj.get("holding"));
		}
	}
	
	/**
	 * 将当前对象转换为JsonObject
	 * 
	 * @return
	 */
	public JSONObject toJson() {
		JSONObject result = new JSONObject();
		if (this.getBookName() != null) {
			result.put("bookName",this.getBookName());
		}
		if (this.getIsbn() != null) {
			result.put("isbn",this.getIsbn());
		}
		if (this.getRating() != null) {
			result.put("rating",this.getRating());
		}
		if (this.getListId() != null) {
			result.put("listId",this.getListId());
		}
		if (this.getHolding() != null) {
			result.put("holding",this.getHolding());
		}
		return result;
	}
	
	
	/**
	 * 获取bookName
	 * 
	 * @return
	 */
	public String getBookName() {
		return bookName;
	}

	/**
	 * 设置bookName
	 * 
	 * @param bookName
	 */
	public void setBookName(String bookName) {
		this.bookName = bookName;
	}
	
	/**
	 * 获取isbn
	 * 
	 * @return
	 */
	public String getIsbn() {
		return isbn;
	}

	/**
	 * 设置isbn
	 * 
	 * @param isbn
	 */
	public void setIsbn(String isbn) {
		this.isbn = isbn;
	}
	
	/**
	 * 获取rating
	 * 
	 * @return
	 */
	public Double getRating() {
		return rating;
	}

	/**
	 * 设置rating
	 * 
	 * @param rating
	 */
	public void setRating(Double rating) {
		this.rating = rating;
	}
	
	/**
	 * 获取listId
	 * 
	 * @return
	 */
	public Integer getListId() {
		return listId;
	}

	/**
	 * 设置listId
	 * 
	 * @param listId
	 */
	public void setListId(Integer listId) {
		this.listId = listId;
	}
	
	/**
	 * 获取holding
	 * 
	 * @return
	 */
	public String getHolding() {
		return holding;
	}

	/**
	 * 设置holding
	 * 
	 * @param holding
	 */
	public void setHolding(String holding) {
		this.holding = holding;
	}

	@Override
	public String toString() {
		return "BookDoubanlistCapital [bookName=" + bookName + " , isbn=" + isbn + " , rating=" + rating + " , listId=" + listId + " , holding=" + holding + "  ]";
	
	}
	
	
}
